package com.itheima.ui;


import com.itheima.dao.IAccountDao;
import com.itheima.service.IAccountService;
import com.itheima.service.impl.AccountServiceImpl;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 模拟一个表现层，用于调用业务层
 */
public class Client {

    public static void main(String[] args) {
        //获取核心容器对象
        ApplicationContext ac = new ClassPathXmlApplicationContext("bean.xml");
        IAccountService ias = (IAccountService)ac.getBean("accountService");
        IAccountDao iad = (IAccountDao)ac.getBean("accountDao");

        System.out.println(ias);
        System.out.println(iad);


//        as.saveAccount();


    }
}
